##############################################################
## MOD Title: Rank Genres
## MOD Author: meermanr < robert.meerman@gmail.com > (Robert Meerman) http://www.RobMeerman.co.uk
## MOD Description: Users can choose a rank genre in their profile, and hence there can exist 
##                  multiple level 2 ranks with different images
## MOD Version: 0.9.0
##
## Installation Level: Intermediate
## Installation Time: 45 Minutes
## Files To Edit: memberlist.php, viewtopic.php, admin_ranks.php, admin_users.php, constants.php, functions_selects.php, usercp_register.php, usercp_viewprofile.php, lang_admin.php, lang_main.php, profile_add_body.tpl, viewtopic_body.tpl, ranks_edit_body.tpl
## Included Files: (admin_rank_genres.php, rank_genres_list_body.tpl)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## !! See admin/admin_rank_genres.php for details on how to setup the rank genres and images.!!
##
##
## NB: If you do no have the MOD RANK MEMBERLSIT mod installed, ignore anything between 
## // MOD RANK MEMBERLIST BEGIN  and // MOD RANK MEMBERLIST END
##
## Successful application of this MOD requires that the existing non-special ranks be renamed to
## numbers (0, 1, 2, 3) which are the 'levels'. Special ranks can work alongside this modification,
## but note that the default behaviour is to over-ride special ranks and display the rank genre image.
## This behavious can be changed in the modified Rank admin page. Regardless which behaviour you choose,
## special rank titles (text) are always displayed in member profiles and the memberlist.
##
## There is a lot of room for optimisation of this code, especially with regard to displaying the rgenre
## image (viewtopic.php). Currently the code scans the filesystem for the image, while looking this up in a table would
## be more efficient.
##
##############################################################
## MOD History:
##
##   2004-10-23 - Version 0.9.0
##      - First attempt at documenting this MOD. Has been in use for a month on my own site without 
##        problems.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE `phpbb_rank_genres` (
	`rank_genre_id` smallint(5) unsigned NOT NULL,
	`rank_genre_name` varchar(20) NOT NULL default '',
	`rank_genre_dir` varchar(20) NOT NULL default '',
	PRIMARY KEY  (`rank_genre_id`) 
) TYPE=MyISAM AUTO_INCREMENT=8;

INSERT INTO `phpbb_config` (`config_name` , `config_value` ) VALUES ( 'default_rgenre', '0' );

ALTER TABLE `phpbb_users` ADD `user_rgenre` SMALLINT( 5 ) NOT NULL AFTER `user_style` ;

#
#-----[ COPY ]------------------------------------------
#
copy admin_rank_genres.php to admin/admin_rank_genres.php
copy rank_genres_list_body.tpl to templates/subSilver/admin/rank_genres_list_body.tpl

#
#-----[ OPEN ]------------------------------------------
#
memberlist.php

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar, user_rank 

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_rgenre 

#
#-----[ FIND ]------------------------------------------
#
		$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
		// MOD RANK MEMBERLIST BEGIN 
		$user_rank = ''; 
		$rank_image = ''; 
		if ( $row['user_rank'] ) 
		{ 
			for($j = 0; $j < count($ranksrow); $j++) 
			{ 
				if ( $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] ) 
				{ 
					$user_rank = $ranksrow[$j]['rank_title']; 
					$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $images['rank'] . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; 
				} 
			} 
		} 
		else 
		{ 
			for($j = 0; $j < count($ranksrow); $j++) 
			{ 
				if ( $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) 
				{ 
					$user_rank = $ranksrow[$j]['rank_title']; 
					$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $images['rank'] . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : ''; 
				} 
			} 
		} 
		// MOD RANK MEMBERLIST END 


#
#-----[ REPLACE WITH ]------------------------------------------
#
		$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
		$poster_rank = '';
		$rank_image = '';
		if ( $row['user_rank'] )
		{
			for($j = 0; $j < count($ranksrow); $j++)
			{
				if ( $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
				{
					$poster_rank = $ranksrow[$j]['rank_title'];
					$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
				}
			}
		}
		else
		{
			for($j = 0; $j < count($ranksrow); $j++)
			{
				if ( $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
				{
					$poster_rgenre = $row['user_rgenre'];
					$sql = "SELECT rank_genre_name FROM " . RANK_GENRES_TABLE. " WHERE rank_genre_id = $poster_rgenre";
					if ( !($rgenre_result = $db->sql_query($sql)) )
					{
						message_die(GENERAL_ERROR, "Could not obtain rank name.", '', __LINE__, __FILE__, $sql);
					}
					$rgenre_row = $db->sql_fetchrow($rgenre_result);

					$user_rank = "Level " . $ranksrow[$j]['rank_title'] . " " .  $rgenre_row['rank_genre_name'];
					$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
				}
			}
		}

#
#-----[ FIND ]------------------------------------------
#
'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ),

#
#-----[ REPLACE WITH ]------------------------------------------
#
'ROW_NUMBER' => $i + ( $start + 1 ),

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid

#
#-----[ IN-LINE FIND ]------------------------------------------
#
u.user_rank

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, u.user_rgenre

#
#-----[ FIND ]------------------------------------------
#
	//
	// Generate ranks, set them to empty string initially.
	//
	$poster_rank = '';
	$rank_image = '';
	if ( $postrow[$i]['user_id'] == ANONYMOUS )
	{
	}
	else if ( $postrow[$i]['user_rank'] )
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}
	else
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
			}
		}
	}

#
#-----[ REPLACE WITH ]------------------------------------------
#
	//
	// Generate ranks, set associated attributes to empty string initially.
	//
	$poster_rank = '';
	$rank_image = '';
	$rank_description = '';
	$special_rank_displayed = false;

	if ( $postrow[$i]['user_id'] == ANONYMOUS )
	{
	}
	else if ( $postrow[$i]['user_rank'] )
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special']==2 )
			{
				$poster_rank = $ranksrow[$j]['rank_title'];
				$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
				$special_rank_displayed = true;
			}
		}
	}
	
	if ( ! $special_rank_displayed )
	{
		for($j = 0; $j < count($ranksrow); $j++)
		{
			if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special']==2 )
			{
				$poster_rgenre = $postrow[$i]['user_rgenre'];
				$sql = "SELECT rank_genre_name FROM " . RANK_GENRES_TABLE. " WHERE rank_genre_id = $poster_rgenre";
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, "Could not obtain rank name.", '', __LINE__, __FILE__, $sql);
				}
				$row = $db->sql_fetchrow($result);

				$poster_rank = "Level " . $ranksrow[$j]['rank_title'] . " " .  $row['rank_genre_name'];
				$rank_image = '';
				
				$root = "./images/ranks";
				$dir = opendir($root);

				while( $file = readdir($dir) )
				{
					if( preg_match("/^$poster_rgenre /", $file) )
					{
						if($file == '.' || $file == '..'){continue;}

						$dir2 = opendir($root . "/" . $file);

						while( $file2 = readdir($dir2))
						{
							if($file2 == '.' || $file2 == '..'){continue;}

							if(preg_match("/^".str_replace("/", "\/" , $ranksrow[$j]['rank_title'])." (.*)\.(jpg|gif)/", $file2, $matches2)){
								$rank_image =  '<img src="' . $root . "/" . $file . "/" . $file2 . '" alt="' . $matches2[1] . '" title="' . $matches2[1] . '" border="0" /><br />';
								$rank_description = "<div align=\"center\"><span class=\"postdetails\">" . $matches2[1] . "</span></div>";
							}
						}

						closedir($dir2);
					}
				}

				closedir($dir);
			}
		}
	}

#
#-----[ FIND ]------------------------------------------
#
		'RANK_IMAGE' => $rank_image,


#
#-----[ AFTER, ADD ]------------------------------------------
#
		'RANK_DESCRIPTION' => $rank_description,


#
#-----[ OPEN ]------------------------------------------
#
admin/admin_ranks.php

#
#-----[ FIND ]------------------------------------------
#
		$rank_is_special = ( $rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
		$rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked=\"checked\"" : "";

#
#-----[ REPLACE WITH ]------------------------------------------
#
		$rank_is_special = ( $rank_info['rank_special']==1 ) ? "checked=\"checked\"" : "";
		$rank_is_not_special = ( $rank_info['rank_special']==0 ) ? "checked=\"checked\"" : "";
		$rank_is_very_special = ( $rank_info['rank_special']==2 ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#
			"MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],

#
#-----[ REPLACE WITH ]------------------------------------------
#
			"VERY_SPECIAL_RANK" => $rank_is_very_special,
			"MINIMUM" => ( !$rank_is_not_special ) ? "" : $rank_info['rank_min'],

#
#-----[ FIND ]------------------------------------------
#
		$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;

#
#-----[ REPLACE WITH ]------------------------------------------
#
		$special_rank = $HTTP_POST_VARS['special_rank'];

#
#-----[ FIND ]------------------------------------------
#
		if( $special_rank == 1 )

#
#-----[ REPLACE WITH ]------------------------------------------
#
		if( $special_rank != 0 )

#
#-----[ FIND ]------------------------------------------
#
			if($special_rank)

#
#-----[ REPLACE WITH ]------------------------------------------
#
			if($special_rank != 0)

#
#-----[ FIND ]------------------------------------------
#
				"SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],

#
#-----[ REPLACE WITH ]------------------------------------------
#
				"SPECIAL_RANK" => ( $special_rank != 0 ) ? $lang['Yes'] : $lang['No'],

#
#-----[ FIND ]------------------------------------------
#
		if( $special_rank == 1 )

#
#-----[ REPLACE WITH ]------------------------------------------
#
		if( $special_rank != 0 )

#
#-----[ FIND ]------------------------------------------
#
		$rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
		$rank_is_special = ( $special_rank != 0 ) ? $lang['Yes'] : $lang['No'];

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php

#
#-----[ FIND ]------------------------------------------
#
			WHERE rank_special = 1

#
#-----[ REPLACE WITH ]------------------------------------------
#
			WHERE rank_special

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
define('RANKS_TABLE', $table_prefix.'ranks');

#
#-----[ AFTER, ADD ]------------------------------------------
#
define('RANK_GENRES_TABLE', $table_prefix.'rank_genres');

#
#-----[ OPEN ]------------------------------------------
#
includes/functions_selects.php

#
#-----[ FIND ]------------------------------------------
#
//
// Pick a timezone
//


#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Pick a rank genre
//
function rgenre_select($default, $select_name = 'rgenre')
{
	global $db;
	
	$sql = "SELECT rank_genre_id, rank_genre_name
		FROM " . RANK_GENRES_TABLE . "
		ORDER BY rank_genre_name";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "Couldn't query ranks table for rank_genre", "", __LINE__, __FILE__, $sql);
	}

	$rgenre_select = '<select name="' . $select_name . '">';
	while ( $row = $db->sql_fetchrow($result) )
	{
		$selected = ( $row['rank_genre_id'] == $default ) ? ' selected="selected"' : '';

		$rgenre_select .= '<option value="' . $row['rank_genre_id'] . '"' . $selected . '>' . $row['rank_genre_name'] . '</option>';
	}
	$rgenre_select .= "</select>";

	return $rgenre_select;
}




#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#
	$user_style = ( isset($HTTP_POST_VARS['style']) ) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
	$user_rgenre = ( isset($HTTP_POST_VARS['rgenre']) ) ? intval($HTTP_POST_VARS['rgenre']) : $board_config['default_rgenre'];

#
#-----[ FIND ]------------------------------------------
#
//
// Did the user submit? In this case build a query to update the users profile in the DB
//
if ( isset($HTTP_POST_VARS['submit']) )
{
	include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);

	$passwd_sql = '';

#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	// RANK GENRES MOD BEGIN
	if(isset($HTTP_POST_VARS['rankgenre']) && ( $HTTP_GET_VARS['mode'] == 'editprofile' || $HTTP_POST_VARS['mode'] == 'editprofile' ) && $userdata['user_level'] == USER)
	{
		$sql = "SELECT rank_genre FROM" . RANKS_TABLE;
		if( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain rank-genre list', '', __LINE__, __FILE__, $sql);
		}		
	}
	// RANK GENRES MOD END
	


#
#-----[ FIND ]------------------------------------------
#
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "

#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_style = $user_style,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_rgenre = $user_rgenre,

#
#-----[ FIND ]------------------------------------------
#
			$sql = "INSERT INTO " . USERS_TABLE . "	(user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
				VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";


#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_popup_pm,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_rgenre,

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$popup_pm,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 $user_rgenre,

#
#-----[ FIND ]------------------------------------------
#
	$user_lang = $userdata['user_lang'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
	$user_rgenre = $userdata['user_rgenre'];

#
#-----[ FIND ]------------------------------------------
#
		'TIMEZONE_SELECT' => tz_select($user_timezone, 'timezone'),


#
#-----[ BEFORE, ADD ]------------------------------------------
#
		'RANK_GENRE_SELECT' => rgenre_select($user_rgenre, 'rgenre'),

#
#-----[ FIND ]------------------------------------------
#
		'L_TIMEZONE' => $lang['Timezone'],

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		'L_RANK_GENRE' => $lang['Rank_genre'],
		'L_RANK_GENRE_EXPLAIN' => $lang['Rank_genre_explain'],


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------
#
			$poster_rank = $ranksrow[$i]['rank_title'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
			$poster_rgenre = $profiledata['user_rgenre'];
			$sql = "SELECT rank_genre_name FROM " . RANK_GENRES_TABLE. " WHERE rank_genre_id = $poster_rgenre";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, "Could not obtain rank name.", '', __LINE__, __FILE__, $sql);
			}
			$row = $db->sql_fetchrow($result);

			$poster_rank = "Level " . $ranksrow[$i]['rank_title'] . " " .  $row['rank_genre_name'];

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Ranks'] = 'Ranks';


#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Rank_Genres'] = 'Rank Genres';

#
#-----[ FIND ]------------------------------------------
#
//
// Ranks admin
//

#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Rank genre admin
//
$lang['RGenre_title'] = 'Rank Genre Updater';
$lang['RGenre_explain'] = 'By loading this page the database has been updated to reflect the filesystem, as shown in the table below. If any errors were produced, they would appear at the very top of this page.';
$lang['RGenre_instructions'] = 'To change names, add a genre or otherwise change the genre ranks edit the underlying filesystem\'s structure. The layout should be obvious once you have a look at the genre data, which is kept in images/ranks';
$lang['RGenre_note'] = '';
$lang['RGenre_genre'] = 'Genre';
$lang['RGenre_level'] = 'Level';



#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Timezone'] = 'Timezone';

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Rank_genre'] = 'Rank Genre';
$lang['Rank_genre_explain'] = 'As you post more, you will be promoted along the path associated with this genre';

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------
#
	<tr> 
	  <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
	  <td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
	</tr>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
	<tr> 
	  <td class="row1"><span class="gen">{L_RANK_GENRE}:</span><br />
		<span class="gensmall">{L_RANK_GENRE_EXPLAIN}</span></td>
	  <td class="row2"><span class="gensmall">{RANK_GENRE_SELECT}</span></td>
	</tr>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

#
#-----[ REPLACE WITH ]------------------------------------------
#
		<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br /><div align="center">{postrow.RANK_IMAGE}{postrow.RANK_DESCRIPTION}<br>{postrow.POSTER_AVATAR}</div><br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/ranks_edit_body.tpl

#
#-----[ FIND ]------------------------------------------
#
		<td class="row2"><input type="radio" name="special_rank" value="1" {SPECIAL_RANK} />{L_YES} &nbsp;&nbsp;<input type="radio" name="special_rank" value="0" {NOT_SPECIAL_RANK} /> {L_NO}</td>

#
#-----[ REPLACE WITH ]------------------------------------------
#
		<td class="row2"><input type="radio" name="special_rank" value="2" {VERY_SPECIAL_RANK} />{L_YES} (Override) &nbsp;&nbsp;<input type="radio" name="special_rank" value="1" {SPECIAL_RANK} />{L_YES} (Normal) &nbsp;&nbsp;<input type="radio" name="special_rank" value="0" {NOT_SPECIAL_RANK} /> {L_NO}</td>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM 